{template 'yp', 'header'}
<div id="main">
  <div id="right">
    <div id="position"><strong>当前位置：</strong><a href="yp/">企业黄页</a><a href="yp/product.php">产品</a>搜索结果</div>
    <div class="bk_10"></div>
    <div class="gsxx_1">
      <span class="gsjs">产品信息</span>
      <span class="zczj">单价（元）</span>
      <span class="area">所在地</span>
    </div>
    <div class="clear"></div>
    <div id="show_0">
{get sql="SELECT * FROM `phpcms_yp_product` `p` , `phpcms_member_company` `c` WHERE  p.status = 99 AND $where ORDER BY p.inputtime DESC" rows="20" page="$page" urlrule="$M[url]product.php?action=searchlist&catid=$catid&areaname=$areaname&lprice=$lprice&hprice=$hprice&q=$q|$M[url]product.php?action=searchlist&catid=$catid&areaname=$areaname&lprice=$lprice&hprice=$hprice&q=$q&page=\\$page"}
	<dl class="list_1 list_2">
      <dt><strong><a href="{show_url('product',$r[id])}">{$r[title]}</a> <span class="time">{date('Y-m-d H:i',$r[inputtime])}</span></strong><span class="zczj">{if $r['price']}{$r[price]}元<a href="company_url($r['userid'],$r[sitedomain])/category-guestbook/label-product/id-{$r['id']}.html">{/if}</span><span class="area">[{$r[areaname]}]</span></dt>
      <dd class="pic"><a href="{show_url('product',$r[id])}"><img src="{thumb($r[thumb],126,80)}" alt="产品图片" width="120" height="80"/></a></dd>
      <dd><strong>产品简介：</strong>{str_cut(strip_tags($r[content]),100,'..')}</dd>
      <dd><strong>生产商：</strong><a href="{company_url($r[userid])}">{$r[companyname]}</a></dd>
    </dl>
{/get}
   </div>
   <div id="pages">{$pages}</div>
  </div>
  <div id="left">
    <div class="box_t">
      <h3>产品库大类列表</h3>
    </div>
    <div class="box_c">
      <ul class="text_list w_100">
	  {get sql="SELECT catname,catid FROM `phpcms_category` WHERE module = 'yp' AND parentid = '0' ORDER BY listorder ASC"}
		<li><a href="{list_url('product',$r[catid])}">{$r['catname']}</a></li>
	  {/get}
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>浏览过的产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list_1">
	  {if $prowhere}
	  {get sql="SELECT id,title,thumb FROM `phpcms_yp_product` WHERE id IN ($prowhere) AND status = 99 ORDER BY FIND_IN_SET(id,'$prowhere')" rows="10"}
	  <li><a href="{show_url('product',$r[id])}"><img src="{thumb($r['thumb'],48,48)}" alt="" width="48" height="48"/></a><a href="{show_url('product',$r[id])}" title="{$r['title']}">{$r['title']}</a></li>
	  {/get}
	  {else}
	  <li>您还没有浏览过任何商品</li>
	  {/if}
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>最新产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list">
        {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid FROM `phpcms_yp_product` `p`,`phpcms_member_company` `c` WHERE c.userid = p.userid AND p.status = 99 ORDER BY id DESC" rows="10"}
			<li>
				<img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/>
				<a href="{show_url('product',$r[id])}" title="{$r['title']}"><strong>{str_cut($r['title'],20,'')}</strong></a>
				<span><a href="{company_url($r['userid'])}" title="{$r['companyname']}">{$r['companyname']}</a></span>
			</li>
		{/get}
      </ul>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>推荐产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list">
        {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid FROM `phpcms_yp_product` `p`,`phpcms_member_company` `c` WHERE c.userid = p.userid AND p.elite = 1 AND p.status = 99 ORDER BY id DESC" rows="10"}
			<li><img src="{thumb($r['thumb'],48,48)}" alt="" width="48" height="48"/><a href="{show_url('product',$r[id])}"><strong>{str_cut($r['title'],20,'')}</strong></a><a href="{company_url($r['userid'])}"><span>{$r['companyname']}</span></a></li>
		{/get}
      </ul>
    </div>
    <div class="box_b"></div>
  </div>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
function my_submit(form)
{
	form.submit();
}
//-->
</SCRIPT>
{template 'yp', 'footer'}